<template>
<dialog-form v-model="dialogVisible" title="权限信息" :confirm-button="true" @confirm="dialogVisible=false">
  <template #content>
    <el-descriptions :column="1"
                     border
    >
      <el-descriptions-item label="权限名">{{data.name}}</el-descriptions-item>
      <el-descriptions-item label="权限标识">{{data.description}}</el-descriptions-item>
      <el-descriptions-item label="识别码">{{data.code}}</el-descriptions-item>
      <el-descriptions-item label="排序">{{data.code}}</el-descriptions-item>
      <el-descriptions-item v-if="data.isMenu" label="路由路径">{{data.routerPath}}</el-descriptions-item>
      <el-descriptions-item v-if="data.isMenu" label="图标">{{data.icon}}</el-descriptions-item>
      <el-descriptions-item v-if="!data.isMenu" label="授权标识">{{data.authorization}}</el-descriptions-item>
      <el-descriptions-item v-if="!data.isMenu" label="访问路径">{{data.url}}</el-descriptions-item>
    </el-descriptions>
  </template>
</dialog-form>
</template>

<script>
import DialogForm from '@/components/dialog/DialogForm'
import { ref } from 'vue'
export default {
  name: 'PermissionDetail',
  components: { DialogForm },
  setup () {
    return {
      dialogVisible: ref(false),
      data: ref({})
    }
  }
}
</script>

<style scoped>

</style>
